<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    class People {
        constructor(heigth){
            this.name = "凯";
            this.skill = ["飞刀","甩剑","变大"];
            this.heigth = heigth;
            this.fn()
            this.win()
        }
        fn(){
            console.log("以绝望挥剑，着逝者为凯");
        }
        win(){
            console.log("胜利");
        }
    }

    class SmallPeople extends People {
        constructor(heigth){
            super(heigth);
            this.time = 1000;
            super.fn();
        }
        fn(){
            console.log("以绝望挥剑，着逝者为凯(子类)");
        }

    }


    let p = new People(10);
    let sp = new SmallPeople(100);
    console.log(p);
    console.log(sp);
</script>